package csdn_math;

public class Test1 {
    public static void main(String[] args) {
        int a=(int)Math.sqrt(16);
        System.out.println(a);

        A.m(45,3,12,65,34,7,2,78,4,2,56,12,5,31,34);
    }
}

class A{
    public static void m(double a,int...arr){
        double avg=0;
        double sum=0;
        for(int data:arr){
            sum+=data;
        }
        avg=sum/arr.length;
        if(Math.min(avg,a)==avg){
            System.out.println("数组平均值"+avg+"小于"+a);
        }
        if(Math.max(a,avg)==avg){
            System.out.println("数组平均值"+avg+"大于"+a);
        }
    }
}

